package kz.kstu.scantest.business.entity.guide;

import kz.kstu.scantest.business.entity.CommonEntityConstant;
import kz.kstu.scantest.business.entity.Identifiable;

import javax.persistence.*;

/**
 * @author Filipp_Stankevich
 *         created: 08.09.11 17:30
 */

@NamedQuery(name = CommonEntityConstant.FIND_SCHOOLS, query = "select s from School s")


@Entity
@Table(name = "SCHOOL")
public class School implements Identifiable{

    private Long id;
    private String name;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Override
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return name;
    }
}
